﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Sgr.Admin.WebHost.Infrastructure.Migrations.Sgr
{
    /// <inheritdoc />
    public partial class SgrSchemaSchema_20251115_02 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "UpdatedAt",
                table: "sgr_sequence_counter",
                newName: "sgr_update_at");

            migrationBuilder.RenameColumn(
                name: "RowVersion",
                table: "sgr_sequence_counter",
                newName: "sgr_row_version");

            migrationBuilder.RenameColumn(
                name: "MaxValue",
                table: "sgr_sequence_counter",
                newName: "sgr_maxvalue");

            migrationBuilder.RenameColumn(
                name: "AllocatedMaxValue",
                table: "sgr_sequence_counter",
                newName: "sgr_allocated_maxvalue");

            migrationBuilder.RenameColumn(
                name: "CustomPrefix",
                table: "sgr_sequence_counter",
                newName: "sgr_custom_prefix");

            migrationBuilder.RenameColumn(
                name: "TimeKey",
                table: "sgr_sequence_counter",
                newName: "sgr_timekey");

            migrationBuilder.RenameColumn(
                name: "Category",
                table: "sgr_sequence_counter",
                newName: "sgr_category");

            migrationBuilder.AddColumn<DateTime>(
                name: "sgr_expriry",
                table: "sgr_sequence_counter",
                type: "datetime(6)",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "sgr_expriry",
                table: "sgr_sequence_counter");

            migrationBuilder.RenameColumn(
                name: "sgr_update_at",
                table: "sgr_sequence_counter",
                newName: "UpdatedAt");

            migrationBuilder.RenameColumn(
                name: "sgr_row_version",
                table: "sgr_sequence_counter",
                newName: "RowVersion");

            migrationBuilder.RenameColumn(
                name: "sgr_maxvalue",
                table: "sgr_sequence_counter",
                newName: "MaxValue");

            migrationBuilder.RenameColumn(
                name: "sgr_allocated_maxvalue",
                table: "sgr_sequence_counter",
                newName: "AllocatedMaxValue");

            migrationBuilder.RenameColumn(
                name: "sgr_custom_prefix",
                table: "sgr_sequence_counter",
                newName: "CustomPrefix");

            migrationBuilder.RenameColumn(
                name: "sgr_timekey",
                table: "sgr_sequence_counter",
                newName: "TimeKey");

            migrationBuilder.RenameColumn(
                name: "sgr_category",
                table: "sgr_sequence_counter",
                newName: "Category");
        }
    }
}
